//
// Decompiled by Jadx - 337ms
//
package gc;

import android.text.TextUtils;
import android.widget.TextView;
import cc.x;
import com.google.gson.Gson;
import fi.c;
import fi.w;
import fn.y;
import gc.aw;
import me.plusne.common.Json.JsonHookStatic;
import me.plusne.common.Json.Soul.AzureJson;

public final class bd implements w.c {
    public final int a;
    public final aw.p b;
    public final w c;

    public bd(aw.p pVar, w wVar, int i) {
        this.a = i;
        this.b = pVar;
        this.c = wVar;
    }

    public final void i(w wVar, c.a aVar, int i, int i2) {
        String language;
        int i3 = this.a;
        w wVar2 = this.c;
        aw.p pVar = this.b;
        switch (i3) {
            case 0:
                pVar.getClass();
                AzureJson.ListDTO listDTO = (AzureJson.ListDTO) new Gson().fromJson(aVar.getKey(), AzureJson.ListDTO.class);
                JsonHookStatic jsonHookStatic = y.by;
                jsonHookStatic.getSpeak().setLanguage(listDTO.getName());
                x xVar = pVar.a;
                TextView textView = xVar.h;
                if (TextUtils.isEmpty(jsonHookStatic.getSpeak().getLanguage())) {
                    language = "未选择";
                } else {
                    language = jsonHookStatic.getSpeak().getLanguage();
                }
                textView.setText(language);
                xVar.e.callOnClick();
                wVar2.c.dismiss();
                return;
            default:
                pVar.getClass();
                JsonHookStatic jsonHookStatic2 = y.by;
                jsonHookStatic2.getSpeak().setLocalName(aVar.getTitle());
                jsonHookStatic2.getSpeak().setVoice(aVar.getDesc());
                x xVar2 = pVar.a;
                xVar2.f.setText(jsonHookStatic2.getSpeak().getLocalName());
                xVar2.c.callOnClick();
                wVar2.c.dismiss();
                return;
        }
    }
}
